#ifndef WORK_H
#define WORK_H

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "user.h"

struct Work {
    char *title;
    char *time;
    char *size;
    char *browse;
    char *give_like;
    char *comment;
    struct Work *next;
};

void initWorksData(struct Work **head, int numWorks);
void printWorksData(struct Work *head);
void free_works(struct Work *head);
void del_work(struct User *u);
void works(int a, struct User *v);
void release(struct User *u);
void maintain(struct User *v);
void conceal(struct User *u);
void recovery(struct User *u);
void sort(struct User *u);
void time_sort(struct User *u);
void name_sort(struct User *u);
int compare_time(const char *time1, const char *time2);
void find(struct User *u);
void display(struct User *u);
void allsort(struct User *u, int (*compare)(const char *, const char *), int sort_type);
#endif
